package com.amsp.oa.oademo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Data
@TableName("overtime_apply")
@ApiModel(value = "加班申请单")
public class OvertimeApply {

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("主键ID")
    private Long id;

    @ApiModelProperty("工号")
    private String employeeId;

    @ApiModelProperty("姓名")
    private String name;

    @ApiModelProperty("部门/组别")
    private String department;

    @ApiModelProperty("加班日期")
    private LocalDate overtimeDate;

    @ApiModelProperty("加班时间")
    private String overtimePeriod;

    @ApiModelProperty("共计加班(H)")
    private Double totalHours;

    @ApiModelProperty("加班事由")
    private String reason;

    @ApiModelProperty("申请日期")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private LocalDate applicationDate;

    @ApiModelProperty("申请人")
    private String applicant;

    @ApiModelProperty("审核人")
    private String reviewer;

    @ApiModelProperty("批准人")
    private String approver;

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;
}